all_tt = {'自然',
          '珠泪哀歌族',
          '真龙',
          '真红眼',
          '召唤兽',
          '战华',
          '斩机',
          '御巫',
          '游魊',
          '尤贝尔',
          '英雄',
          '焰圣骑士',
          '星骑士&&星圣',
          '相剑',
          '吸血鬼',
          '无限起动',
          '童话动物',
          '铁兽战线',
          '淘气仙星',
          '死狱乡',
          '兽带斗神',
          '十二兽',
          '圣夜',
          '圣像骑士',
          '神数',
          '神碑',
          '入魔',
          '青眼白龙',
          '骑甲虫',
          '破坏剑&&破坏之剑士',
          '魔偶甜点',
          '门之守护神',
          '龙女仆',
          '炼装勇士',
          '雷龙',
          '雷精',
          '恐吓爪牙族',
          '金傲大奖赛',
          '疾行机人',
          '急袭猛禽',
          '机界骑士',
          '霍普&&异热同心',
          '幻奏',
          '幻影骑士团',
          '坏兽',
          '护宝炮妖',
          '红莲',
          '黑羽',
          '黑魔导',
          '光道',
          '铁兽战线',
          '虫惑魔',
          '齿轮',
          '捕食植物',
          '宝玉兽',
          '金傲大奖赛',
          '影依',
          '自奏'}

tag2setname = {'自然': ['自然'], '珠泪哀歌族': ['珠泪哀歌族'], '真龙': ['真龙'], '真红眼': ['真红眼'],
               '召唤兽': ['召唤兽'], '战华': ['战华'], '斩机': ['斩机'], '御巫': ['御巫'], '游魊': ['魊影'],
               '尤贝尔': ['于贝尔'], '英雄': ['英雄', '幻影英雄', '邪心英雄', '假面英雄', '元素英雄', '命运英雄'],
               '焰圣骑士': ['焰圣骑士', '焰圣剑'],
               '星骑士&&星圣': ['星骑士', '星辉士', '星圣'],
               '相剑': ['相剑'], '吸血鬼': ['吸血鬼'], '无限起动': ['无限起动'], '童话动物': ['童话动物'],
               '铁兽战线': ['铁兽'], '淘气仙星': ['淘气仙星'], '死狱乡': ['死狱乡'], '兽带斗神': ['兽带斗神'],
               '十二兽': ['十二兽'], '圣夜': ['圣夜骑士'], '圣像骑士': ['圣像骑士'], '神数': ['神数'], '神碑': ['神碑'],
               '入魔': ['入魔'], '青眼白龙': ['青眼'], '骑甲虫': ['骑甲虫'],
               '破坏剑&&破坏之剑士': ['破坏剑', '破坏之剑士'], '魔偶甜点': ['魔偶甜点'], '门之守护神': ['门之守护神','迷宫壁'],
               '龙女仆': ['半龙女仆'], '炼装勇士': ['炼装'], '雷龙': ['雷龙'], '雷精': ['卫星闪灵'],
               '恐吓爪牙族': ['恐吓爪牙族'], '金傲大奖赛': ['金傲大奖赛'], '疾行机人': ['疾行机人', 'SR'],
               '急袭猛禽': ['急袭猛禽', 'RR'], '机界骑士': ['机界骑士'], '霍普&&异热同心': ['霍普', '异热同心'],
               '幻奏': ['幻奏','幻奏的音姬'], '幻影骑士团': ['幻影骑士团', '幻影'], '坏兽': ['坏兽'], '护宝炮妖': ['护宝炮妖'],
               '红莲': ['红莲魔', '共鸣者'], '黑羽': ['黑羽'], '黑魔导': ['魔术', '黑魔术', '黑魔术少女'],
               '光道': ['光道'],
               '虫惑魔': ['虫惑魔', '虫惑', '洞'],
               '齿轮': ['齿轮齿轮', '齿轮齿轮人'], '捕食植物': ['捕食植物'], '宝玉兽': ['宝玉兽', '宝玉', '究极宝玉神'],
               '影依': ['影依'], '自奏': ['自奏圣乐']}

setcode = {'魊影': '0x18a', '英雄': '0x8', '入魔': '0xa', '侵入魔鬼': '0x100a', '疾行机人': '0x2016', 'SR': '0x2016',
           '自然': '0x2a',
           '黑羽': '0x33', '宝玉': '0x34', '宝玉兽': '0x1034', '高等宝玉兽': '0x5034', '究极宝玉神': '0x5034',
           '光道': '0x38',
           '真红眼': '0x3b', '红莲魔': '0x1045', '守护者': '0x52', '星圣': '0x53', '魔偶甜点': '0x71',
           '齿轮齿轮': '0x72', '齿轮齿轮人': '0x1072', '焰圣骑士': '0x507a', '异热同心': '0x7e',
           '异热同心武器': '0x107e', '异热同心从者': '0x207e', '霍普': '0x7f', '虫惑魔': '0x108a', '吸血鬼': '0x8e',
           '幻奏': '0x9b', '幻奏的音姬': '0x109b', '星骑士': '0x9c', '星辉士': '0x109c', '影依': '0x9d',
           '急袭猛禽': '0xba', 'RR': '0xba', '神数': '0xc4', '坏兽': '0xd3', '破坏剑': '0xd6', '破坏之剑士': '0xd7',
           '幻影骑士团': '0x10db', '十二兽': '0xf1', '捕食植物': '0x10f3', '召唤兽': '0xf4', '真龙': '0xf9',
           '淘气仙星': '0xfb', '机界骑士': '0x10c', '圣像骑士': '0x116', '自奏圣乐': '0x11b', '雷龙': '0x11c',
           '无限起动': '0x127', '斩机': '0x132', '半龙女仆': '0x133', '战华': '0x137', '童话动物': '0x146',
           '护宝炮妖': '0x155', '圣夜骑士': '0x159', '死狱乡': '0x164', '相剑': '0x16b', '骑甲虫': '0x170',
           '兽带斗神': '0x179', '恐吓爪牙族': '0x17a', '神碑': '0x17f', '珠泪哀歌族': '0x181', '御巫': '0x18d',
           '金傲大奖赛': '0x192', '于贝尔': '0x1a5', '铁兽': '0x14d', '门之守护神': '0x1052', '炼装': '0xe1',
           '青眼': '0xdd', "卫星闪灵": "0x180", "魔导": "0x6e", "共鸣者": "0x57", "焰圣剑": "0x607a", "虫惑": "0x8a",
           "洞": "0x89", "元素英雄": "0x3008", "幻影英雄": "0x5008", "邪心英雄": "0x6008", "假面英雄": "0xa008",
           "命运英雄": "0xc008", "魔术": "0xa2", "黑魔术": "0x10a2", "黑魔术少女": "0x30a2",
           "幻影": "0xdb",
           "迷宫壁": "0x193"}

no_limit = {"融合": "0x46", "升阶魔法": "0x95", "No.": "0x48", "灵摆": "0xf2", }

banned = {'91869203': 0, '20663556': 0, '44910027': 0, '51858306': 0, '07563579': 0, '62242678': 0, '34945480': 0,
          '08903700': 0, '11384280': 0, '17412721': 0, '32909498': 0, '50588353': 0, '62320425': 0, '25926710': 0,
          '03040496': 0, '34124316': 0, '02563463': 0, '88071625': 0, '61665245': 0, '52653092': 0, '48905153': 0,
          '85115440': 0, '59537380': 0, '86148577': 0, '88581108': 0, '21377582': 0, '27381364': 0, '16923472': 0,
          '15341821': 0, '77679716': 0, '37818794': 0, '92731385': 0, '69015963': 0, '79875176': 0, '75732622': 0,
          '22593417': 0, '39064822': 0, '03679218': 0, '54719828': 0, '63504681': 0, '58820923': 0, '26400609': 0,
          '78706415': 0, '93369354': 0, '23558733': 0, '09929398': 0, '70369116': 0, '31178212': 0, '63101919': 0,
          '34206604': 0, '14702066': 0, '96782886': 0, '90809975': 0, '83152482': 0, '34086406': 0, '85243784': 0,
          '73356503': 0, '57421866': 0, '41482598': 0, '44763025': 0, '17375316': 0, '74191942': 0, '42829885': 0,
          '45986603': 0, '55144522': 0, '23557835': 0, '31423101': 0, '57953380': 0, '54447022': 0, '60682203': 0,
          '69243953': 0, '79571449': 0, '63789924': 0, '70828912': 0, '42703248': 0, '76375976': 0, '34906152': 0,
          '46411259': 0, '85602018': 0, '27174286': 0, '05851097': 0, '93016201': 0, '61740673': 0, '03280747': 0,
          '64697231': 0, '80604091': 0, '32723153': 0, '17178486': 0, '28566710': 0, '76794549': 1, '40177746': 1,
          '53804307': 1, '17330916': 1, '90411554': 1, '68304193': 1, '67441435': 1, '12289247': 1, '99937011': 1,
          '38814750': 1, '74586817': 1, '32731036': 1, '36521307': 1, '78872731': 1, '06602300': 1, '63542003': 1,
          '78080961': 1, '81275020': 1, '13533678': 1, '76145933': 1, '94677445': 1, '82385847': 1, '90361010': 1,
          '15291624': 1, '04928565': 1, '00572850': 1, '37961969': 1, '74078255': 1, '73956664': 1, '90953320': 1,
          '90448279': 1, '17266660': 1, '06637331': 1, '72656408': 1, '33854624': 1, '33396948': 1, '44519536': 1,
          '07902349': 1, '08124921': 1, '70903634': 1, '35272499': 1, '94689206': 1, '24094258': 1, '04423206': 1,
          '33508719': 1, '89399912': 1, '92746535': 1, '19613556': 1, '77103950': 1, '33782437': 1, '61292243': 1,
          '01845204': 1, '81439173': 1, '84211599': 1, '23701465': 1, '83764718': 1, '46060017': 1, '15443125': 1,
          '52340444': 1, '32807846': 1, '72892473': 1, '73628505': 1, '18144506': 1, '21347668': 1, '75500286': 1,
          '52947044': 1, '07394770': 1, '73468603': 1, '93600443': 1, '65681983': 1, '71832012': 1, '36637374': 1,
          '44362883': 1, '92107604': 1, '27970830': 1, '02295440': 1, '82732705': 1, '90846359': 1, '35316708': 1,
          '21076084': 1, '23002292': 1, '69811710': 2, '91800273': 2, '09411399': 2, '69610326': 2, '65734501': 2,
          '03285551': 2, '66957584': 2, '35726888': 2, '67723438': 2, '35261759': 2, '12580477': 2, '04031928': 2,
          '48130397': 2, '11110587': 2, '24207889': 2, '55584558': 2, '56700100': 2, '92714517': 2, '24224830': 2,
          '14532163': 2}
